Retrieve configuration information about an App Server servicing the MarkLogic REST API. This request is only available on port 8002.
Upon success, MarkLogic Server returns status 200 (OK) and the instance configuration details.
rest-admin
role, or the
following privileges:
http://marklogic.com/xdmp/privileges/rest-admin
http://marklogic.com/xdmp/privileges/rest-writer
http://marklogic.com/xdmp/privileges/rest-reader
You may only make this request against port 8002.
The name component of the request URI should be the name of
an MarkLogic REST API instance created by making a POST request to
/v1/rest-apis
. For details, see "POST /v1/rest-apis".
If more than one group contains an instance (or App Server) with the
requested name and you do not supply a group
parameter,
MarkLogic Server returns 400 (Bad Request).
The response contains the App Server configuration information for name, as either JSON or XML. For details on the meaning of the fields, see Creating and Configuring App Servers in the Scripting Administrative Tasks Guide.
Specify the expected response content type using either the
format
parameter or Accept
header. If you supply
both, the format
parameter takes precedence. If you specify
neither, XML is returned.
For more details, see Retrieving Configuration Information in the REST Application Developer's Guide.
curl --anyauth --user user:password -X GET -i -H "Accept: application/xml" \ http://localhost:8002/v1/rest-apis/my-service ==> Information about the rest service named "my-service", in XML: Content-type: text/html; charset=UTF-8 Server: MarkLogic Content-Length: 2001 Connection: close HTTP/1.1 200 OK Server: MarkLogic Content-Type: text/xml; charset=UTF-8 Content-Length: 85 Connection: close <rapi:rest-api xmlns:rapi="http://marklogic.com/rest-api"> <rapi:name>my-service</rapi:name> <rapi:group>Default</rapi:group> <rapi:database>my-database</rapi:database> <rapi:modules-database>my-service-modules</rapi:modules> <rapi:port>8003</rapi:port> </rapi:rest-api>
curl --anyauth --user user:password -X GET -i \ -H "Accept: application/json" \ http://localhost:8002/v1/rest-apis/my-service ==> Information about the rest service named "my-service", in JSON: Server: MarkLogic Content-Length: 2004 Connection: close HTTP/1.1 200 OK Server: MarkLogic Content-Type: text/plain; charset=UTF-8 Content-Length: 115 Connection: close { "name": "my-service", "group": "Default", "database": "bill", "modules-database": "my-service-modules", "port": "8003" }